Handle static inline GtkOrdering function
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 4 Mar 2021 22:58:05 +0000 (22:58 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 11 Mar 2021 16:37:38 +0000 (16:37 +0000)
commit816383e9efd7e83c49202a6ac71079ac71b036fa
tree3aa68f7721e4954f8b5a4117b7551600f69284ba
parent90cf6bb686fce15dad981eb86215495242afcf48
Handle static inline GtkOrdering function

The introspection scanner does not handle `static inline` functions:
they are not in the shared library, so cannot be dlsym() out of it; and
the `static` keyword tells g-ir-scanner to skip the function declaration
entirely.

We can trick the scanner into thinking the gtk_ordering_from_cmpfunc()
symbol is a real, public one, by declaring and defining a regular
function under the `__GI_SCANNER__` guard; the symbol does not appear
when actually building GTK, or any code using GTK, so we don't risk
collisions.
gtk/gtkenums.h
gtk/gtksorter.c